package com.software.frontend.mine.utils;

import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.drawable.BitmapDrawable;

import com.software.frontend.R;
import com.software.frontend.mine.entity.Comment;
import com.software.frontend.mine.entity.Fans;
import com.software.frontend.mine.entity.Like;
import com.software.frontend.mine.entity.SystemNotice;

import java.util.ArrayList;

public class DataUtils {

    public static ArrayList<Like> getLikesNotices(Context context){
        //Likes
        ArrayList<Like> likeData = new ArrayList<>();
        ArrayList<Bitmap> bitmaps = new ArrayList<>();
        bitmaps.add(Bitmap.createBitmap(((BitmapDrawable)(context.getResources().getDrawable(R.drawable.head1))).getBitmap()));
        Like like = new Like();
        like.setSelfName("Sheep");
        like.setTimeLate(3);
        like.setOhtersHead(bitmaps);
        like.setPostPicture(((BitmapDrawable)(context.getResources().getDrawable(ly.img.android.pesdk.ui.all.R.drawable.imgly_overlay_rain))).getBitmap());
        likeData.add(like);

        ArrayList<Bitmap> bitmaps1 = new ArrayList<>();
        for (int i = 0; i <6; i++) {
            bitmaps1.add(Bitmap.createBitmap(((BitmapDrawable)(context.getResources().getDrawable(R.drawable.head1))).getBitmap()));
        }
        Like like1 = new Like();
        like1.setSelfName("boots");
        like1.setTimeLate(3);
        like1.setOhtersHead(bitmaps1);
        like1.setPostPicture(((BitmapDrawable)(context.getResources().getDrawable(ly.img.android.pesdk.ui.all.R.drawable.imgly_overlay_rain))).getBitmap());
        likeData.add(like1);
        return likeData;
    }

    public static ArrayList<Comment> getCommentNotices(Context context){
        //Comments
        ArrayList<Comment> commentsData = new ArrayList<>();
        Comment comment = new Comment();
        comment.setComment("不错呦！");
        comment.setCommentedComment("看起来不错瓦");
        comment.setHandlerHead(((BitmapDrawable)(context.getResources().getDrawable(R.drawable.head1))).getBitmap());
        comment.setPostPicture(((BitmapDrawable)(context.getResources().getDrawable(ly.img.android.pesdk.ui.all.R.drawable.imgly_overlay_rain))).getBitmap());
        comment.setHandlerName("小山羊");
        commentsData.add(comment);

        Comment comment1 = new Comment();
        comment1.setComment("不错呦！");
        comment1.setHandlerHead(((BitmapDrawable)(context.getResources().getDrawable(R.drawable.head1))).getBitmap());
        comment1.setPostPicture(((BitmapDrawable)(context.getResources().getDrawable(ly.img.android.pesdk.ui.all.R.drawable.imgly_overlay_rain))).getBitmap());
        comment1.setHandlerName("大山羊");
        commentsData.add(comment1);
        return commentsData;
    }

    public static ArrayList<SystemNotice> getSystemNotices(Context context){
        //SystemNotice
        ArrayList<SystemNotice> systemNoticeData = new ArrayList<>();
        SystemNotice systemNotice = new SystemNotice();
        systemNotice.setNotice("我们的版本更新啦，快来看看吧！");
        systemNotice.setTimeLate(2);
        systemNoticeData.add(systemNotice);
        return systemNoticeData;
    }

    public static ArrayList<Fans> getFansNotices(Context context){
        //Fans
        ArrayList<Fans> fansData = new ArrayList<>();
        Fans fans = new Fans();
        fans.setName("小宝");
        fans.setHead(Bitmap.createBitmap(((BitmapDrawable)(context.getResources().getDrawable(R.drawable.head1))).getBitmap()));
        fans.setHasReAction(true);
        fans.setTimeLate(0);
        fansData.add(fans);

        Fans fans1 = new Fans();
        fans1.setName("大宝");
        fans1.setHead(Bitmap.createBitmap(((BitmapDrawable)(context.getResources().getDrawable(R.drawable.head1))).getBitmap()));
        fans1.setHasReAction(false);
        fans1.setTimeLate(20);
        fansData.add(fans1);
        return fansData;
    }
}
